
import java.io.PrintWriter;
import java.util.HashMap;

class Program extends Node {

	private Node block = null;
	private String name = null;

	public Program(Node pBlock, String pName) {
		id = "block";
		block = pBlock;
		name = pName;
	}

	@Override
	public void print(PrintWriter pw) {
		pw.println("Node name: Root/Program. Program name is: " + name);
		block.print(pw);
	}

	public String translate(HashMap<String, PrintWriter> pws, String condition, SymbolTable rt, String parent) {
//		pw.print("public class Program ");
		/*String key = rt.getStack().get(1);
		PrintWriter pw = pws.get(key);*/
		
		rt.getStack().push("program");
		System.out.println("program pushed: program");
		if (block != null) {
			block.translate(pws, null, rt, parent);
		}
		return null;
	}
	
	public Node getChild() {
		return block;
	}

}
